<template>
  <div class="connectionStatus">
    <a-tag :color="color">
      {{ $getEnum(hedgeDict.connectionStatus, flag) }}
    </a-tag>
  </div>
</template>

<script>
import hedgeDict from "@/dict/hedge";

export default {
  props: {
    flag: {
      type: Number
    }
  },
  data() {
    return {
      hedgeDict
    };
  },
  computed: {
    color() {
      return this.flag === hedgeDict.connectionStatus.connected.value
        ? "green"
        : "";
    }
  }
};
</script>
